#include "./task2.h"

namespace rt {

Task2<int> test2() {
    co_return 3;
}

struct Move {

    Move() = default;
    Move(const Move&) = delete;
    Move(Move&&) = default;

    Move& operator=(Move&&) = default;
};

Task2<Move> test3() {
    Move m;
    co_return m;
}

Task2<int> test_task2() {
    int v = co_await test2();
    Move v2 = co_await test3();
    co_return 1;
}

static void test() {

}

template <typename T>
concept TestTraits = requires(T v) {
    { v.add() } -> std::same_as<void>;
    { v.sub() } -> std::same_as<int>;
};

template <TestTraits T>
static void test2(const T& t) {
    t.add();
    t.sub();
}



}
